package icu.sehnen.service;

import icu.sehnen.dao.CoachDao;
import icu.sehnen.model.CoachModel;

import java.util.ArrayList;
import java.util.List;

public class CoachService {


    public List<CoachModel> getCoachModelForHome() {
        CoachDao coachDao=new CoachDao();
        List<CoachModel> coachModelList=new ArrayList<>();
        Integer length=coachDao.name.size();
        for (int i=0;i<length;i++ ){
            CoachModel coachModel=new CoachModel();
            coachModel.setImgUrl(coachDao.imgUrl.get(i));
            coachModel.setName(coachDao.name.get(i));
            coachModel.setLevel(coachDao.level.get(i));
            coachModelList.add(coachModel);

        }

        return coachModelList;
    }
}
